GetTimeZone Function

public function GetTimeZone(time) result(timeZone)

Gets the string representing time zone of the datetime represented by this instance. Example: '+02:00'

Arguments

Type IntentOptional Attributes Name
type(DateTime), intent(in) :: time

Return Value character(len=6)


Variables

Type Visibility Attributes Name Initial
character(len=25), public :: string

Source Code

FUNCTION  GetTimeZone &
!
(time) &
!
RESULT (timeZone)

IMPLICIT NONE

! Arguments with intent(in):
TYPE (DateTime), INTENT(IN) :: time

! Local variables:
CHARACTER (LEN = 6) :: timeZone
CHARACTER (LEN = 25) :: string

!------------end of declaration------------------------------------------------

string = time
timeZone = string (20:25)

END FUNCTION GetTimeZone